import dayjs from "dayjs";
const environment=import.meta.env.MODE

const printLog={
    info(actionType:string,message:any,data:any=null){
        console.log(dayjs().format('YYYY-MM-DD HH:mm:ss')+"["+environment+""+"|信息类型: "+actionType+"] "+message,data)
    },
    warn(actionType:string,message:any,data:any=null){
        console.warn(dayjs().format('YYYY-MM-DD HH:mm:ss')+"["+environment+""+"|信息类型: "+actionType+"] "+message,data)
    },
    error(actionType:string,message:any,data:any=null){
        console.error(dayjs().format('YYYY-MM-DD HH:mm:ss')+"["+environment+""+"|信息类型: "+actionType+"] "+message,data)
    },
    assert(actionType:string,message:any,data:any=null){
        console.assert(true,dayjs().format('YYYY-MM-DD HH:mm:ss')+"["+environment+""+"|信息类型: "+actionType+"] "+message,data)
    }
}

export default printLog;
